﻿// See https://aka.ms/new-console-template for more information
//XOR运算符号^ 转换过程先转成二进制，再进行异或运算
int verifyValue = 70 ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ^ 6 ^ 999 ^ 1 ^ 1 ^ 1 ^ 1 ^ 11 ^ 100;
ushort aaa = 70 ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ^ 6 ^ 999 ^ 1 ^ 1 ^ 1 ^ 1 ^ 100 ^11;
Console.WriteLine(verifyValue);
Console.WriteLine(aaa);


Console.WriteLine("-------------");

int TASKNO = 21;
int WORD1;
Console.WriteLine((70).ToString("X"));
//十进制转换成16进制 .ToString("X")
WORD1 = TASKNO ^ 1;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1^1001;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001^3;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001 ^ 3 ^ 3;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ^ 6 ;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ^ 6 ^ 999 ;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ^ 6 ^ 999 ^ 1 ;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ^ 6 ^ 999 ^ 1 ^ 5;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ^ 6 ^ 999 ^ 1 ^ 5 ^ 1 ;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ^ 6 ^ 999 ^ 1 ^ 5 ^ 1 ^ 1 ;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ^ 6 ^ 999 ^ 1 ^ 5 ^ 1 ^ 1 ^ 100 ;
Console.WriteLine(WORD1.ToString("X"));
WORD1 = TASKNO ^ 1 ^ 1001 ^ 3 ^ 3 ^ 1 ^ 6 ^ 999 ^ 1 ^ 5 ^ 1 ^ 1 ^ 100 ^ 11;
Console.WriteLine(WORD1.ToString("X"));
Console.WriteLine("十进制显示为："+WORD1);
Console.ReadKey();

//int类型 32位 4byte
//char类型 8位 1byte